home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 21
/
Cream of the Crop 21 (Terry Blount) (October 1996).iso
/
comm
/
pirch32.zip
/
COUNT.PIL
< prev
next >
Wrap
Text File
|
1996-07-22
|
764b
|
29 lines
{ SAMPLE PIL SCRIPT [COUNT]
Usage /runscript [COUNT]
Counts the people in the channel, seperating ops and
undernet bots }
ops := 0;
bots := 0;
usercount := strtoint($members);
for i := 1 to usercount do
begin
$s := nicklist($audience,i);
if $s = 'X' then
bots := bots + 1;
if $s = 'W' then
bots := bots + 1;
if isop($audience,$s) then
ops := ops + 1;
end;
if bots = 1 then
$s2 := ' is a service bot';
if bots <> 1 then
$s2 := ' are service bots';
ops := ops - bots;
if usercount > 0 then
percentage := ops * 100 / usercount
else
percentage := 0;
command('/msg ',$audience,' There are ',$members, ' members of ',$audience,' (',ops,' are ops and ',bots,$s2,') ',
percentage,'% of ',$audience,' is occupied by ops');